libxenlight: fix GC when cloning contexts
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 4 Dec 2009 07:02:49 +0000 (07:02 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 4 Dec 2009 07:02:49 +0000 (07:02 +0000)
commit88de8df0dca10d6c7f8bca833f09b324216ac318
treea11729432982b668d2128e8e973e87cb03fa36e1
parent78eed7d0445b3d8d16beb526128544b12e928343
libxenlight: fix GC when cloning contexts

Provide a function to clone a context. This is necessary
because simply copying the structs will eventually
corrup the GC: maxsize is updated in the cloned context
but not in the originating, yet they have the same array
of referenced pointers alloc_ptrs.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.com>
tools/libxl/libxl.c
tools/libxl/libxl_device.c
tools/libxl/libxl_internal.c
tools/libxl/libxl_internal.h